class Solution
{
public:
    vector<int> sockCollocation(vector<int>& nums)
    {
        map<int, int> count;
        for (int n : nums) count[n]++;
        vector<int> ans;
        for (auto p : count)
            if (p.second == 1)
                ans.push_back(p.first);
        return ans;
    }
};